<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS gradient</title>

    <style>
        div {
            height: 50px;
            margin: 20px;
            background: #888;
        }

        .placeholder {
            height: 50px;
            background: linear-gradient( to right, red, orange, yellow, green, blue, indigo, violet);
        }

        .linear {
            background: linear-gradient(red, orange);
        }

        .radial {
            width: 400px;
            height: 400px;
            border-radius: 200px;
            background: radial-gradient(yellow, yellow 10%, black 11%, yellow 11%, yellow 22%, black 23%, red 23%, red 33%, black 34%, red 34%, red 45%, black 46%, blue 46%, blue 57%, black 58%, blue 58%, blue)
        }

        .conic {
            width: 400px;
            height: 400px;

            /*仅Chrome支持，且需要开启实验功能选项(2018-07-05)*/
            background: conic-gradient(deeppink 0, deeppink 30%, yellowgreen 30%, yellowgreen 70%, teal 70%, teal 100%);
            border-radius: 50%;
        }
    </style>
</head>

<body>

    <div class="placeholder">线性渐变（彩虹🌈）</div>

    <div class="linear">线性渐变</div>

    <div class="radial">径向渐变</div>

    <div class="conic">锥向渐变（目前[2018-07-05]仅Chrome支持，且需要开启其实验功能选项）</div>

</body>

</html>